package com.dai.designpattern.prototype.practice;

import com.dai.designpattern.prototype.practice.context.SceneContext;

import java.util.Scanner;

/*
   模拟入口程序
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            // 输入两个内容，用户id和用户请求内容，中间用空格隔开
            String input = scanner.nextLine();
            String[] inputArr = input.split(" ");
            AbstractScene scene = SceneContext.currentScene(inputArr[0], inputArr[1]);
            System.out.println(scene.deal(inputArr[1]));
        }
    }
}
